// 解决方案面包屑设置
export const getLevelList = (name) => {
  return [
    { title: '解决方案', path: '/solutions', name: 'solution' },
    { title: '解决方案描述', path: '/solutions/feature', name: 'feature' },
    // { title: '方案优势', path: '/solutions/advantage', name: 'advantage' },
    // { title: '核心产品', path: '/solutions/product' },
    // { title: '合作伙伴', path: '/solutions/partner' },
  ].map(item => item.name === name ? { ...item, redirect: 'noRedirect' } : item);
}

// 产品服务面包屑设置
export const getProductLevelList = name => {
  return [
    { title: '产品列表', path: '/product', name: 'product-service' },
    { title: '解决问题', path: '/product/feature', name: 'feature' },
    // { title: '产品效益', path: '/product/advantage' },
    { title: '应用场景', path: '/product/scene', name: 'scene' }
  ].map(item => item.name === name ? { ...item, redirect: 'noRedirect' } : item);
}

// 是否启用列表
export const isEnableOptions = [{ value: 1, label: '是' }, { value: 0, label: '否' }];
// 是否启用
const customIsEnableMap = {};
for (const { value, label } of isEnableOptions) {
  customIsEnableMap[value] = label
}
export const isEnableMap = customIsEnableMap;

// 职位配置
export const positionOptions = [
  { value: 1, label: '前端' }
];

// 薪资配置
export const salaryOptions = [
  { value: 1, label: '1k - 3k' }
];

// 经验要求配置
export const experienceRequireOptions = [
  { value: 1, label: '1-3年' }
];

// 学历要求
export const educationRequireOptions = [
  { value: 1, label: '本科' }
];

// 职位性质
export const positionNatureOptions = [
  { value: 0, label: '兼职' },
  { value: 1, label: '全职' }
];

// 工作地点
export const workSiteOptions = [
  { value: 1, label: '杭州' }
];


// 解决方案描述类型
export const solutionSolveOptions = [
  { value: 1, label: '解决问题' },
  { value: 2, label: '方案优势' }
];

const customSolutionSolveMap = {};
for (const { value, label } of solutionSolveOptions) {
  customSolutionSolveMap[value] = label
}

export const solutionSolveMap = customSolutionSolveMap;

// 请求来源
export const requestSourceOptions = [
  { value: 1, label: '通用' },
  { value: 11, label: 'PC' },
  { value: 21, label: 'H5' }
]

const customRequestSourceMap = {};
for (const { value, label } of requestSourceOptions) {
  customRequestSourceMap[value] = label
}

export const requestSourceMap = customRequestSourceMap;


// 下拉菜单命令列表
export const commandList = [
  { value: 'detail', label: '详情' },
  { value: 'edit', label: '修改' },
  { value: 'delete', label: '删除' },
  { value: 'enable', label: '启用' },
  { value: 'disable', label: '禁用' }
];
